<?php

namespace app\admin\validate;

use think\Validate;

class Isp extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'img_id'  => 'number|between:1,6',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'img_id.require' => '要为数字',
        'img_id.number'  => '1~6的整数'
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => [],
        'edit' => [],
    ];

    public function __construct(array $rules = [], $message = [], $field = [])
    {
        $this->field = [
            'img_id' => __('img_id'),
        ];
        // parent::__construct($rules, $message, $field);
    }
    
}
